package com.ct.dao.common;

import com.ct.model.common.Entity;
import com.ct.dao.searching.Query;

import java.util.Collection;


/**
 * Created by IntelliJ IDEA.
 * User: nmkravchenko
 * Date: 22.10.2009
 * Time: 17:43:25
 * To change this template use File | Settings | File Templates.
 */
public interface SearchDao{

    <T extends Entity> Collection<T> findByQuery(Query<T> aQuery);

    <T extends Entity> Collection<T> findByQuery(Query<T> aQuery, int aOffset, int aCount);

    <T extends Entity> T findFirst(Query<T> aQuery);

    int getCount(Query aQuery);
}
